Electronic devices, such as mobile phones and tablet computers, often need to be debugged when software of the electronic device is updated or broken. However, a debug port used to debug the electronic device is often covered by a casing of the electronic device, so the casing needs to be opened to debug the electronic device, which is inconvenient.